Skip to content

ci(changelog): update commit message template#791

Merged
BLumia merged 1 commit into
linuxdeepin:masterfrom
mhduiy:master
Jun 24, 2026
Merged

ci(changelog): update commit message template#791
BLumia merged 1 commit into
linuxdeepin:masterfrom
mhduiy:master

Conversation

@mhduiy

@mhduiy mhduiy commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
  1. Change the changelog pull request title to use a version bump subject.
  2. Expand the generated commit message into title, content, and Log sections.
  3. Align the generated content and Log text with the changelog update wording.

Log: Update the changelog workflow commit message template to match the required format.

ci(changelog): 更新提交信息模板

  1. 将 changelog 拉取请求标题改为版本升级主题。
  2. 将生成的提交信息扩展为标题、正文和 Log 三段格式。
  3. 让生成的正文和 Log 文案符合 changelog 更新要求。

Log: 更新 changelog 流程的提交信息模板以匹配要求格式。

Summary by Sourcery

Update the changelog automation workflow commit message format for version bumps.

CI:

  • Change the changelog PR title to use a version bump subject instead of a generic changelog update.
  • Expand the changelog workflow commit message into separate title, body, and log sections aligned with the required format.

1. Change the changelog pull request title to use a version bump subject.
2. Expand the generated commit message into title, content, and Log sections.
3. Align the generated content and Log text with the changelog update wording.

Log: Update the changelog workflow commit message template to match the required format.

ci(changelog): 更新提交信息模板

1. 将 changelog 拉取请求标题改为版本升级主题。
2. 将生成的提交信息扩展为标题、正文和 Log 三段格式。
3. 让生成的正文和 Log 文案符合 changelog 更新要求。

Log: 更新 changelog 流程的提交信息模板以匹配要求格式。
@sourcery-ai

sourcery-ai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the changelog automation workflow so the PR title and commit message follow a version-bump style subject and a three-part commit template (title, body, Log) aligned with the changelog wording.

Flow diagram for updated changelog workflow commit message template

flowchart TD
  trigger["Push triggering update-changelog workflow"] --> job_update_changelog["Job update-changelog"]
  job_update_changelog --> step_prepare["Step prepare (set version and safe_version)"]
  step_prepare --> step_create_pr["Step create-pull-request"]
  step_create_pr --> pr["Pull request with title 'chore: bump version to <version>'"]
  step_create_pr --> commit["Commit message with title, body, and Log sections"]
Loading

File-Level Changes

Change Details Files
Adjust changelog automation PR title to use a version-bump style subject.
  • Change the generated pull request title from a generic changelog update to a version bump phrasing using the prepared version output
.github/workflows/update-changelog.yml
Expand and standardize the autogenerated commit message format for changelog updates.
  • Replace the single-line commit message with a multi-line message containing a subject line, a body line describing the changelog update, and a Log line
  • Ensure all three sections interpolate the prepared version output to keep wording consistent with changelog requirements
.github/workflows/update-changelog.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

deepin pr auto review

★ 总体评分:75分

■ 【总体评价】

代码实现了工作流PR文案的修改,但存在严重的语义逻辑错误
逻辑错误导致版本管理混乱,因语义错乱扣15分,文案不规范扣10分

■ 【详细分析】

  • 1.语法逻辑(存在错误)✕

.github/workflows/update-changelog.yml 第287行,将 PR 标题和首行 commit message 从 update changelog 修改为 bump version,但该工作流的实际职责是更新变更日志,并非升级版本号。这会导致 Git 历史记录中版本升级与日志更新的语义完全混淆,破坏基于 Conventional Commits 的自动化版本筛选逻辑。
潜在问题:通过 git log --grep="bump version" 筛选版本升级提交时,会错误地包含仅更新 changelog 的提交;语义错乱影响后续发版自动化流程的准确性。
建议:将 PR 标题和首行 commit message 恢复为 chore: update changelog to ${{ steps.prepare.outputs.version }},确保文案与工作流实际职责一致。

  • 2.代码质量(较差)✕

在第288-292行新增的 commit-message 多行文本中,第二行 update changelog to... 与首行语义重复,且第三行 Log: update changelog to... 引入了不符合 Conventional Commits 规范的自定义前缀 Log:,降低了提交信息的规范性。
潜在问题:多余的自定义 Log: 标记会干扰标准 commit message 解析工具的正常工作;重复的描述降低了变更历史的可读性。
建议:移除多余的正文描述和非标准的 Log: 前缀,保持 commit message 简洁并严格符合社区规范。

  • 3.代码性能(无性能问题)✓

此变更为 GitHub Actions 工作流配置文件的纯静态文本修改,不涉及算法复杂度、循环调用或系统资源分配,无任何性能损耗。
建议:保持当前状态即可。

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
配置文件中使用的变量 ${{ steps.prepare.outputs.version }} 来源于上游步骤的内部安全输出,不涉及外部不可信输入,不存在命令注入或敏感信息泄露风险。

  • 建议:继续保持对内部步骤输出的使用,避免在后续扩展中引入未经净化处理的外部输入。

■ 【改进建议代码示例】

--- a/.github/workflows/update-changelog.yml
+++ b/.github/workflows/update-changelog.yml
@@ -284,13 +284,8 @@ jobs:
         with:
           token: ${{ steps.app_token.outputs.token }}
           branch: automation/update-changelog/${{ steps.prepare.outputs.safe_version }}
-          title: "chore: bump version to ${{ steps.prepare.outputs.version }}"
-          commit-message: |
-            chore: bump version to ${{ steps.prepare.outputs.version }}
-
-            update changelog to ${{ steps.prepare.outputs.version }}
-
-            Log: update changelog to ${{ steps.prepare.outputs.version }}
+          title: "chore: update changelog to ${{ steps.prepare.outputs.version }}"
+          commit-message: "chore: update changelog to ${{ steps.prepare.outputs.version }}"
           body: |
             Automated changelog update.
 

@BLumia BLumia merged commit f7f3af4 into linuxdeepin:master Jun 24, 2026
6 checks passed
@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants